import request from '@/utils/request'

// 获取指标类型下拉列表
export function getKpiTypeList() {
  return request({
    url: '/operation/web/operationKpiConfig/kpiTypeList',
    method: 'get'
  })
}

// 查询KPI指标详细配置列表
export function getKpiConfigList(params) {
  return request({
    url: '/operation/web/operationKpiConfig/list',
    method: 'get',
    params
  })
}

// 获取KPI指标详细配置详细信息
export function getKpiConfigDetail(kpiConfigId) {
  return request({
    url: `/operation/web/operationKpiConfig/${kpiConfigId}`,
    method: 'get'
  })
}

// 新增KPI指标详细配置
export function addKpiConfig(data) {
  return request({
    url: '/operation/web/operationKpiConfig',
    method: 'post',
    data
  })
}

// 修改KPI指标详细配置
export function updateKpiConfig(data) {
  return request({
    url: '/operation/web/operationKpiConfig',
    method: 'put',
    data
  })
}

// 删除KPI指标详细配置
export function deleteKpiConfig(kpiConfigIds) {
  return request({
    url: `/operation/web/operationKpiConfig/${kpiConfigIds}`,
    method: 'delete'
  })
}